#include <iostream>
#include <string>
#include <conio.h>


#include <map>

#include "Automata.h"
#include "RegularExpression.h"
using namespace std;

CAlphabet alp;
COperatorSet oper;
void main()
{
/*
	CREParseTree tree,test;
	
	CAutomata nfa;


//	test.Tree(&tree);

	nfa.ConstFromREParseTree(&tree);
	
	nfa.print();
	*/
//////////////////////////////////////
	string value;
//	COperatorSet pOSet;
//	CAlphabet pAlp;
	CRegularExpression cr(&oper,&alp);
	CREParseTree *root;

	CAutomata nfa;	

	cin>>value;
	cr.SetValue(value);
	root=cr.ToREParseTree();
	nfa.ConstFromREParseTree(root);

	nfa.print();
	
	getch();
}